<?php

use think\migration\Migrator;
use think\facade\Config;

class PluginCurdField extends Migrator
{
    public function change()
    {
        $table = $this->table('plugin_curd_field', [
            'engine'    => 'InnoDB',
            'comment'   => '自动生成curd字段管理',
            'collation' => 'utf8mb4_general_ci',
        ]);

        //删除表
        if ($table->exists()) {
            $dbPrefix = Config::get('database.connections.' . Config::get('database.default') . '.prefix');
            $tableName = $table->getName();
            \think\facade\Db::execute('drop table if exists ' . $dbPrefix . $tableName);
//            $table->drop(); // 为什么不用这个方法来删除表，因为在我使用thinkphp6时，think-migrate的composer包并没有对这个方法进行具体实现，所以不能删除表
        }

        $table
            ->addColumn('table_id', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '表ID'])
            ->addColumn('field', 'string', ['limit' => 255, 'default' => '', 'comment' => '字段名'])
            ->addColumn('comment', 'string', ['limit' => 255, 'default' => '', 'comment' => '字段注释'])
            ->addColumn('data_type', 'string', ['limit' => 255, 'default' => '', 'comment' => '存储类型'])
            ->addColumn('limit', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '存储长度'])
            ->addColumn('precision', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '整数部分长度'])
            ->addColumn('scale', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '小数部分长度'])
            ->addColumn('default', 'string', ['limit' => 255, 'default' => '', 'comment' => '默认值'])
            ->addColumn('is_empty', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否允许为空，1=允许，2=不允许'])
            ->addColumn('is_thead_sort', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否允许点击表头进行排序，1=允许，2=不允许'])
            ->addColumn('default_select_sort', 'string', ['limit' => 255, 'default' => '', 'comment' => '默认查询排序，asc正序，desc倒序'])
            ->addColumn('search_show', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否在搜索表单显示，1=显示，2=不显示'])
            ->addColumn('table_show', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否在数据表格显示，1=显示，2=不显示'])
            ->addColumn('add_show', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否在添加表单中显示，1=显示，2=不显示'])
            ->addColumn('edit_show', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否在编辑表单中显示，1=显示，2=不显示'])
            ->addColumn('show_sort', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '显示排序'])
            ->addColumn('is_create_tab', 'boolean', ['limit' => 4, 'default' => '0', 'comment' => '是否创建Tab切换，1=创建，2=不创建'])
            ->addColumn('cell_width', 'integer', ['limit' => 11, 'default' => '0', 'comment' => '数据表格列宽，单位px'])
            ->addColumn('form_type', 'string', ['limit' => 255, 'default' => '', 'comment' => '表单元素'])
            ->addColumn('addition', 'text', ['comment' => '附加设置'])
            ->addColumn('relation', 'text', ['comment' => '关联模型'])
            ->addColumn('create_time', 'datetime', ['null' => 1, 'comment' => '创建时间'])
            ->addColumn('update_time', 'datetime', ['null' => 1, 'comment' => '更新时间'])
            ->addColumn('delete_time', 'datetime', ['null' => 1, 'comment' => '删除时间'])
        ;

        $data = [
            [
                'table_id' => '1',
                'field' => 'name',
                'comment' => '名称',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'sort',
                'comment' => '排序',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '0',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"1"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'pid',
                'comment' => '父id',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '0',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'xm_select',
                'addition' => '{"single_multi_type":"single","max":"","direction":"","data_from_type":"table","table_id":"lt_area","title_field":"short_name","sub_title_field":"","icon_field":""}',
                'relation' => '{"table":"lt_area","type":"belongsTo","field":"id","show_field":"short_name","fun_name":"parent"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'short_name',
                'comment' => '简称',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'xm_select',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'merge_name',
                'comment' => '全称',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'level',
                'comment' => '层级',
                'data_type' => 'boolean',
                'limit' => '4',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'radio',
                'addition' => '{"value":["1","2","3"],"text":["省","市","区"],"default":0}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'pinyin',
                'comment' => '拼音',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'code',
                'comment' => '长途区号',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'zip',
                'comment' => '邮编',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'first',
                'comment' => '首字母',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'lng',
                'comment' => '经度',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'lat',
                'comment' => '纬度',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'create_time',
                'comment' => '创建时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'update_time',
                'comment' => '更新时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '1',
                'field' => 'delete_time',
                'comment' => '删除时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'email',
                'comment' => '邮箱',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'password',
                'comment' => '密码',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'password',
                'addition' => '{"re_password":"1","input_type":"2","save_type":"2","password_min_length":"6","password_max_length":"26"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'nickname',
                'comment' => '昵称',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'sex',
                'comment' => '性别',
                'data_type' => 'boolean',
                'limit' => '4',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'radio',
                'addition' => '{"value":["1","2"],"text":["男","女"],"default":0}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'vip_time',
                'comment' => 'vip到期时间.单位秒.0表示未开通过vip',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '0',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'avatar',
                'comment' => '头像',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '0',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"accept":"image","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"single","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'login_time',
                'comment' => '注册时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'login_ip',
                'comment' => '登录IP',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'status',
                'comment' => '账号状态',
                'data_type' => 'boolean',
                'limit' => '4',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'switch',
                'addition' => '{"close_value":"2","close_text":"锁定","open_value":"1","open_text":"正常","default_status":"open"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'create_time',
                'comment' => '创建时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'update_time',
                'comment' => '更新时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '2',
                'field' => 'delete_time',
                'comment' => '删除时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'username',
                'comment' => '用户名',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'nickname',
                'comment' => '昵称',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'password',
                'comment' => '密码',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'password',
                'addition' => '{"re_password":"1","input_type":"2","save_type":"2","password_min_length":"6","password_max_length":"26"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'avatar',
                'comment' => '头像',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"image","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"single","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'is_super_manager',
                'comment' => '是否超管',
                'data_type' => 'boolean',
                'limit' => '4',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'switch',
                'addition' => '{"close_value":"2","close_text":"否","open_value":"1","open_text":"是","default_status":"close"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'status',
                'comment' => '状态',
                'data_type' => 'boolean',
                'limit' => '4',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'switch',
                'addition' => '{"close_value":"2","close_text":"禁用","open_value":"1","open_text":"正常","default_status":"open"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'create_time',
                'comment' => '创建时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'update_time',
                'comment' => '更新时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '3',
                'field' => 'delete_time',
                'comment' => '删除时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '4',
                'field' => 'name',
                'comment' => '分类名',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '4',
                'field' => 'pid',
                'comment' => '上级分类',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'xm_select',
                'addition' => '{"single_multi_type":"single","max":"","direction":"","data_from_type":"table","table_id":"lt_test_category","title_field":"name","sub_title_field":"","icon_field":""}',
                'relation' => '{"table":"lt_test_category","type":"belongsTo","field":"id","show_field":"name","fun_name":"parent"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '4',
                'field' => 'sort',
                'comment' => '排序',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => 'desc',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"1"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '4',
                'field' => 'create_time',
                'comment' => '创建时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '4',
                'field' => 'update_time',
                'comment' => '更新时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '4',
                'field' => 'delete_time',
                'comment' => '删除时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'input',
                'comment' => '单行文本输入框',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '2',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"0"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'input_edit',
                'comment' => '单行输入框（可编辑）',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'input',
                'addition' => '{"verify":"","open_table_edit":"1"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'sel_admin_id',
                'comment' => '选择后台管理员',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'xm_select',
                'addition' => '{"single_multi_type":"single","max":"","direction":"","data_from_type":"table","table_id":"lt_admin_user","title_field":"nickname","sub_title_field":"","icon_field":""}',
                'relation' => '{"table":"lt_admin_user","type":"belongsTo","field":"id","show_field":"nickname","fun_name":"selAdminUser"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'textarea',
                'comment' => '文本域',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'textarea',
                'addition' => '',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'hero',
                'comment' => '选择英雄（单选）',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'radio',
                'addition' => '{"value":["1","2","3","4","5","6"],"text":["秀逗魔法师","德玛西亚之力","德玛西亚皇子","德邦总管赵信","蛮族之王","潘森"],"default":0}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'status',
                'comment' => '状态（开关单选）',
                'data_type' => 'boolean',
                'limit' => '4',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'switch',
                'addition' => '{"close_value":"2","close_text":"锁定","open_value":"1","open_text":"正常","default_status":"close"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'hobby',
                'comment' => '爱好（复选框）',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'checkbox',
                'addition' => '{"value":["1","2","3","4","5","6"],"text":["游泳","唱歌","台球","桌游","象棋","朗诵"],"default":[]}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'browser',
                'comment' => '浏览器（单选下拉框）',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'select',
                'addition' => '{"value":["1","2","3","4","5"],"text":["Chrome","FireFox","IE","360安全浏览器","QQ浏览器"],"default":0}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'category_id',
                'comment' => '所属分类（单选）',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'xm_select',
                'addition' => '{"single_multi_type":"single","max":"","direction":"","data_from_type":"table","table_id":"lt_test_category","title_field":"name","sub_title_field":"","icon_field":""}',
                'relation' => '{"table":"lt_test_category","type":"belongsTo","field":"id","show_field":"name","fun_name":"category"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'category_ids',
                'comment' => '所属分类（多选）',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'xm_select',
                'addition' => '{"single_multi_type":"multi","max":"","direction":"","data_from_type":"table","table_id":"lt_test_category","title_field":"name","sub_title_field":"","icon_field":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'province_id',
                'comment' => '省',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'linkage_xm_select',
                'addition' => '{"group_name":"所属地区","left_id":"","right_id":"city_id","table_id":"lt_area","paging":"1","text_field":"short_name","sub_text_field":"name","param":{"field":["pid"],"condition":["="],"value":["0"]},"search":"1","search_param":{"field":[""],"condition":["="]},"left_onchange_param":{"field":[""],"condition":["="]}}',
                'relation' => '{"table":"lt_area","type":"belongsTo","field":"id","show_field":"short_name","fun_name":"province"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'city_id',
                'comment' => '市',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'linkage_xm_select',
                'addition' => '{"group_name":"所属地区","left_id":"province_id","right_id":"district_id","table_id":"lt_area","paging":"1","text_field":"short_name","sub_text_field":"name","param":{"field":[""],"condition":["="],"value":[""]},"search":"1","search_param":{"field":[""],"condition":["="]},"left_onchange_param":{"field":["pid"],"condition":["="]}}',
                'relation' => '{"table":"lt_area","type":"belongsTo","field":"id","show_field":"short_name","fun_name":"city"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'district_id',
                'comment' => '区',
                'data_type' => 'integer',
                'limit' => '11',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'linkage_xm_select',
                'addition' => '{"group_name":"所属地区","left_id":"city_id","right_id":"","table_id":"lt_area","paging":"1","text_field":"short_name","sub_text_field":"name","width":"300","param":{"field":[""],"condition":["="],"value":[""]},"search":"1","search_param":{"field":[""],"condition":["="]},"left_onchange_param":{"field":["pid"],"condition":["="]}}',
                'relation' => '{"table":"lt_area","type":"belongsTo","field":"id","show_field":"short_name","fun_name":"district"}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'color',
                'comment' => '颜色选择器',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'color_picker',
                'addition' => '{"color":"","format":"hex"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'img',
                'comment' => '上传单个图片',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"image","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"single","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'imgs',
                'comment' => '上传多个图片',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"image","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"multi","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'video',
                'comment' => '上传单个视频',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"video","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"single","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'videos',
                'comment' => '上传多个视频',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"video","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"multi","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'music',
                'comment' => '上传单个音频',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"audio","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"single","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'musics',
                'comment' => '上传多个音频',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"audio","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"multi","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'file',
                'comment' => '上传单个任意文件',
                'data_type' => 'string',
                'limit' => '255',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"file","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"single","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'files',
                'comment' => '上传多个任意文件',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'upload',
                'addition' => '{"accept":"file","upload_type":"local","via_server":"via","width":0,"height":0,"multi":"multi","max":"","dir":"","url":"","mime":"","size":""}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'ueditor',
                'comment' => 'ueditor编辑器',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '1',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'editor',
                'addition' => '{"type":"ueditor","upload_type":"local"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'meditor',
                'comment' => 'meditor编辑器',
                'data_type' => 'text',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '2',
                'add_show' => '1',
                'edit_show' => '1',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'editor',
                'addition' => '{"type":"meditor","upload_type":"local"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'create_time',
                'comment' => '创建时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '1',
                'table_show' => '1',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'update_time',
                'comment' => '更新时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
            [
                'table_id' => '5',
                'field' => 'delete_time',
                'comment' => '删除时间',
                'data_type' => 'datetime',
                'limit' => '0',
                'precision' => '11',
                'scale' => '2',
                'default' => '',
                'is_empty' => '1',
                'is_thead_sort' => '2',
                'default_select_sort' => '',
                'search_show' => '2',
                'table_show' => '2',
                'add_show' => '2',
                'edit_show' => '2',
                'show_sort' => '0',
                'is_create_tab' => '2',
                'cell_width' => '0',
                'form_type' => 'laydate',
                'addition' => '{"date_type":"datetime"}',
                'relation' => '{"table":"","type":"belongsTo","field":"","show_field":"","fun_name":""}',
                'create_time' => date('Y-m-d H:i:s'),
                'update_time' => date('Y-m-d H:i:s'),
            ],
        ];

        $table->setData($data)->create();
    }
}